<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Writing polkit Authentication Agents</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="polkit Reference Manual">
<link rel="up" href="overview.html" title="Part I. polkit Overview">
<link rel="prev" href="polkit-apps.html" title="Writing polkit applications">
<link rel="next" href="polkit-extending.html" title="Extending polkit">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="polkit-apps.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="overview.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">polkit Reference Manual</th>
<td><a accesskey="n" href="polkit-extending.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="polkit-agents"></a>Writing polkit Authentication Agents</h2></div></div></div>
<p>
      Authentication agents are provided by desktop environments. When
      an user session starts, the agent registers with the polkit
      Authority using
      the <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-method-org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent" title="RegisterAuthenticationAgent ()">RegisterAuthenticationAgent()</a>
      method. When services are needed, the authority will invoke
      methods on
      the <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.AuthenticationAgent.html" title="org.freedesktop.PolicyKit1.AuthenticationAgent Interface">org.freedesktop.PolicyKit1.AuthenticationAgent</a>
      D-Bus interface. Once the user is authenticated, (a privileged
      part of) the agent invokes
      the <a class="link" href="eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-method-org.freedesktop.PolicyKit1.Authority.AuthenticationAgentResponse" title="AuthenticationAgentResponse ()">AuthenticationAgentResponse()</a>
      method.  Note that the polkit Authority itself does not care
      how the agent authenticates the user.
    </p>
<p>
      The <a class="link" href="ref-authentication-agent-api.html" title="Part V. Authentication Agent API Reference">libpolkit-agent-1</a>
      library provides helpers to make it easy to build authentication
      agents that use the native authentication system
      e.g. pam<code class="literal">(8)</code>.
    </p>
<p>
      If the environment variable <code class="literal">POLKIT_DEBUG</code> is
      set, the libpolkit-agent-1 library prints out diagnostic
      information on standard output.
    </p>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>